package com.study.bridge.message;

public class Test {
    public static void main(String[] args) {
        EmailMessage emailMessage = new EmailMessage();
        AbstractMessage message = new NormalMessage(emailMessage);
        message.sendMessage("加班","王总");

        SmsMessage smsMessage = new SmsMessage();
        AbstractMessage message2 = new EmergencyMessage(smsMessage);
        message2.sendMessage("加班","王总");
    }
}
